home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / UCRASM25.ARJ / UTOAM.ASM < prev   
Assembly Source File  |  1991-10-12  |  770b  |  34 lines

  1. StdGrp        group    stdlib,stddata
  2. stddata        segment    para public 'sldata'
  3. stddata        ends
  4. ;
  5. stdlib        segment    para public 'slcode'
  6.         assume    cs:stdgrp
  7.         extrn    sl_malloc:far, sl_utoa:far, sl_itoa:far
  8. ;
  9. ; UTOAM-
  10. ;        These routines convert the value in AX to a string
  11. ;        of digits.  They automatically allocate storage on the
  12. ;        heap for their results and return a pointer to the new
  13. ;        string in ES:DI.
  14. ;
  15. ;        These routines return the carry set if there was a memory
  16. ;        allocation error (insufficient room on heap).
  17. ;
  18. ;
  19. ; UTOAM-     Processes 16-bit unsigned value in AX.
  20. ;
  21.         public    sl_utoam
  22. sl_utoam    proc    far
  23.         push    cx
  24.         mov    cx, 6        ;Maximum 6 chars.
  25.         call    sl_malloc
  26.         pop    cx
  27.         jnc    GotoUTOA
  28.         ret
  29. GotoUTOA:    jmp    sl_utoa
  30. sl_utoam    endp
  31. ;
  32. ;
  33. stdlib        ends
  34.         end